import { dec2hex } from './constant'

export function u8ToHex(data: Uint8Array): string {
  let hex = ''
  for (let i = 0, l = data.length; i < l; i++) {
    hex += dec2hex[data[i]]
  }
  return hex
}
